import config from "@/config";
import http from "@/utils/request";

export default {
	add: {
		url: `${config.API_URL}/workflow/add`,
		name: "新增项目",
		post: async function (data) {
			return await http.post(this.url, data);
		},
	},
	update: {
		url: `${config.API_URL}/workflow/update`,
		name: "编辑项目",
		post: async function (data) {
			return await http.post(this.url, data);
		},
	},
	remove: {
		url: `${config.API_URL}/workflow/remove`,
		name: "删除项目",
		post: async function (data) {
			return await http.post(this.url, data);
		},
	},
	disable: {
		url: `${config.API_URL}/workflow/disable`,
		name: "禁用项目",
		post: async function (data) {
			return await http.post(this.url, data);
		},
	},
	detail: {
		url: `${config.API_URL}/workflow/detail`,
		name: "详情",
		get: async function (data) {
			return await http.get(this.url + "/id=" + data);
		},
	},
	page: {
		url: `${config.API_URL}/workflow/list/page`,
		name: "项目分页列表",
		get: async function (data) {
			return await http.post(this.url, data);
		},
	},
};
